﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Text;

namespace IntegratedOnBordDebug.UDPSocket
{
    public class OnUdpSocketDataReceive<T> : IDataEvent<T>
    {
        public int OnDataRecived(EndPoint remoteHost, byte[] dataBuff, int dataSize)
        {
            Debug.WriteLine(string.Format("Received data from {0} ,data: {1}",remoteHost.ToString(),Common.BytesToHex(dataBuff)));
            return dataSize;
        }

        public int OnDataSended(EndPoint remoteHost, byte[] dataBuff, int dataSize)
        {
            Debug.WriteLine(string.Format("Send data to {0} ,data: {1}", remoteHost.ToString(), Common.BytesToHex(dataBuff)));
            return dataSize;
        }
    }
}
